/**
 * pharma-business - 27 févr. 2011 guillaume
 */
package org.bspv.pharma.business.rules;

import java.util.List;

/**
 * @author guillaume
 * 
 */
public abstract class AbstractValidateAllLeafSpecification<T> extends AbstractListLeafSpecification<T> {

    /**
     * @see org.bspv.pharma.business.rules.AbstractListLeafSpecification#isSatisfiedBy(java.util.List)
     */
    @Override
    public boolean isSatisfiedBy(List<T> candidate) {
        boolean res = true;
        for (T element : candidate) {
            if (res && !isElementSatisfiedBy(element)) {
                res = false;
            }
        }
        return res;
    }

}
